package com.high.school.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.high.school.dao.UserDao;
import com.high.school.model.User;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
    private UserDao userDAO;
	
	@Override
	@Transactional
	public void addUser(User user) {
		 userDAO.addUser(user);
		
	}

	@Override
	@Transactional
	public List<User> listUser() {
		  return userDAO.listUser();
	}

	@Override
	public void removeUser(Long id) {
		userDAO.removeUser(id);
		
	}

}
